package com.codebattery.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;

@Configuration
public class RabbitMQConfig {

    //商品交换机
    public static final String GOODS_EXCHANGE = "GOODS_EXCHANGE";

    //商品队列
    public static final String GOODS_QUEUE = "GOODS_QUEUE";

    //商品路由键
    public static final String GOODS_ROUTING_KEY = "GOODS_ROUTING_KEY";

    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}

